package mya.mes.mdc.logic.utils;

import mya.mes.mdc.model.alarm.MdcAlarm;
import mya.mes.mdc.model.alarm.MdcAlarmHis;
import mya.mes.mdc.model.status.MdcStatus;
import mya.mes.mdc.model.status.MdcStatusHis;

public class HisBuilder {


    public static MdcStatusHis from(MdcStatus status) {

        if (status == null) {
            return null;
        }
        MdcStatusHis his = new MdcStatusHis();

        BeanCopy.copySrcToDest(status, his);

        return his;
    }

    public static MdcAlarmHis from(MdcAlarm alarm) {

        if (alarm == null) {
            return null;
        }
        MdcAlarmHis his = new MdcAlarmHis();

        BeanCopy.copySrcToDest(alarm, his);

        return his;
    }


}
